package com.tanhua.dubbo.api.mongo;

import com.tanhua.model.mongo.Soul;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;

import java.util.List;

/**
 * @author mdoya
 * @version 1.0
 * @description:
 */
@DubboService
public class SoulApiImpl implements SoulApi {

    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public List<Soul> findTestSoul() {
        return mongoTemplate.findAll(Soul.class);
    }
}
